<!-- 功能配置 -->
<template>
  <Loading v-if="loading" title="功能加载中..." />
  <FuncMain v-else :func-bean="funcBean" />
</template>
<script>
  import { defineComponent, ref } from 'vue';
  import { useRoute } from 'vue-router';
  import { FuncMain } from '@/views/config/components';
  import { Loading } from '@jecloud/ui';
  import { initConfigData } from '@/hooks/use-func-config';
  export default defineComponent({
    components: { FuncMain, Loading },
    setup() {
      const loading = ref(true);
      const route = useRoute();
      const funcBean = ref();
      initConfigData({ funcId: route.params.funcId }).then((data) => {
        funcBean.value = data.funcBean;
        loading.value = false;
      });
      return {
        loading,
        funcBean,
      };
    },
  });
</script>
<style scoped>
  .je-func-config-page {
    height: 100%;
  }
</style>
